package com.jumper.study.admin.dto.resp;

import java.time.LocalDateTime;
import java.time.ZoneOffset;

import com.jumper.study.common.api.OrderStatusCode;

public class OrderResp {
    private Long id;

    private String orderNo;

    private Long accountId;

    private String studentName;

    private Long lessonId;

    private String lessonTitle;

    private OrderStatusCode status;

    private Integer price;

    private LocalDateTime createdAt;

    public OrderResp() {
    }

    public OrderResp(Long id, String orderNo, Long accountId, String studentName, Long lessonId, String lessonTitle,
            OrderStatusCode status, Integer price, LocalDateTime createdAt) {
        this.id = id;
        this.orderNo = orderNo;
        this.accountId = accountId;
        this.studentName = studentName;
        this.lessonId = lessonId;
        this.lessonTitle = lessonTitle;
        this.status = status;
        this.price = price;
        this.createdAt = createdAt;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public Long getLessonId() {
        return lessonId;
    }

    public void setLessonId(Long lessonId) {
        this.lessonId = lessonId;
    }

    public String getLessonTitle() {
        return lessonTitle;
    }

    public void setLessonTitle(String lessonTitle) {
        this.lessonTitle = lessonTitle;
    }

    public String getStatus() {
        return status.getMessage();
    }

    public Integer getStatusCode() {
        return status.getCode();
    }

    public void setStatus(OrderStatusCode status) {
        this.status = status;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Long getCreatedAt() {
        return createdAt.toEpochSecond(ZoneOffset.UTC);
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
}
